package com.bosssoft.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bosssoft.entity.dto.FibAccountDTO;
import com.bosssoft.entity.po.FibAccountPO;
import com.bosssoft.entity.vo.FibAccountVO;
import com.bosssoft.page.PageResult;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * 账户表(FibAccount)表服务接口
 *
 * @author makejava
 * @since 2021-08-17 15:08:05
 */
@Service
public interface FibAccountService extends IService<FibAccountPO> {

    boolean transferById(Long fromId, Long toId, BigDecimal amount);

    boolean transferByAcc(Long fromAcc, Long toAcc, BigDecimal amount);

    BigDecimal getBalanceByAcc(Long acc);

    BigDecimal getBalanceById(Long id);

    FibAccountDTO selectOneById(Long id);

    List<FibAccountDTO> selectAll(Long page,Long limit);

    PageResult<FibAccountPO> page(Page<FibAccountPO> page, FibAccountPO fibAccountPO);

    boolean delete(Long accId);

    boolean insert(FibAccountDTO fibAccountDTO);

    boolean update(FibAccountDTO fibAccountDTO);

    boolean updateDeleted(FibAccountDTO fibAccountDTO);

    boolean updateBalance(FibAccountDTO fibAccountDTO);

    boolean updatePassword(FibAccountDTO fibAccountDTO);
}
